'''
中文数字转阿拉伯数字

'''


common_used_numerals = {'零': 0, '一': 1, '二': 2, '三': 3, '四': 4, '五': 5, '六': 6, '七': 7, '八': 8, '九': 9, '十': 10,
                        '百': 100, '千': 1000, '万': 10000, '亿': 100000000}


def chinese2digits(uchars_chinese):
    total = 0
    r = 1
    for i in range(len(uchars_chinese) - 1, -1, -1):
        x = common_used_numerals.get(uchars_chinese[i], 0)
        if x >= 10:
            if x > r:
                r = x
            else:
                r = r * x
        else:
            total += r * x

    return total
print(chinese2digits('一亿零八万零三百二十三'))